﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Tunnel.DevicesControls
{
    public partial class CCTV_FixedColor : DeviceBase
    {
        string deviceID;
        string shortName;
        string name;
        string typeID;
        string devicePos;
        int picX;
        int picY;
        string stationCode;
        string groupID;
        string commType;
        string protocol;
        string port;
        int factoryID;
        int controllable;
        DateTime updateTime;
        string updateBy;
        string standardID;
        string tunnel;

        string typeName;
        string subSys;

        string statusID;
        DateTime rsTime;
        string statusDescription;

        string paramAddr;
        string paramValue;
        DateTime cmdTime;
        string runned;

        public string DeviceID
        {
            get
            {
                return deviceID;
            }

            set
            {
                deviceID = value;
            }
        }

        public string ShortName
        {
            get
            {
                return shortName;
            }

            set
            {
                shortName = value;
            }
        }

        public string Name1
        {
            get
            {
                return name;
            }

            set
            {
                name = value;
            }
        }

        public string TypeID
        {
            get
            {
                return typeID;
            }

            set
            {
                typeID = value;
            }
        }

        public string DevicePos
        {
            get
            {
                return devicePos;
            }

            set
            {
                devicePos = value;
            }
        }

        public int PicX
        {
            get
            {
                return picX;
            }

            set
            {
                picX = value;
            }
        }

        public int PicY
        {
            get
            {
                return picY;
            }

            set
            {
                picY = value;
            }
        }

        public string StationCode
        {
            get
            {
                return stationCode;
            }

            set
            {
                stationCode = value;
            }
        }

        public string GroupID
        {
            get
            {
                return groupID;
            }

            set
            {
                groupID = value;
            }
        }

        public string CommType
        {
            get
            {
                return commType;
            }

            set
            {
                commType = value;
            }
        }

        public string Protocol
        {
            get
            {
                return protocol;
            }

            set
            {
                protocol = value;
            }
        }

        public string Port
        {
            get
            {
                return port;
            }

            set
            {
                port = value;
            }
        }

        public int FactoryID
        {
            get
            {
                return factoryID;
            }

            set
            {
                factoryID = value;
            }
        }

        public int Controllable
        {
            get
            {
                return controllable;
            }

            set
            {
                controllable = value;
            }
        }

        public DateTime UpdateTime
        {
            get
            {
                return updateTime;
            }

            set
            {
                updateTime = value;
            }
        }

        public string UpdateBy
        {
            get
            {
                return updateBy;
            }

            set
            {
                updateBy = value;
            }
        }

        public string StandardID
        {
            get
            {
                return standardID;
            }

            set
            {
                standardID = value;
            }
        }

        public string Tunnel
        {
            get
            {
                return tunnel;
            }

            set
            {
                tunnel = value;
            }
        }

        public string TypeName
        {
            get
            {
                return typeName;
            }

            set
            {
                typeName = value;
            }
        }

        public string SubSys
        {
            get
            {
                return subSys;
            }

            set
            {
                subSys = value;
            }
        }

        public string StatusID
        {
            get
            {
                return statusID;
            }

            set
            {
                statusID = value;
            }
        }

        public DateTime RsTime
        {
            get
            {
                return rsTime;
            }

            set
            {
                rsTime = value;
            }
        }

        public string StatusDescription
        {
            get
            {
                return statusDescription;
            }

            set
            {
                if (value == "正常")
                {
                    this.Image = Respic.彩色固定摄像机正常;
                }
                if (value == "故障")
                {
                    this.Image = Respic.彩色固定摄像机故障;
                }

                statusDescription = value;
            }
        }

        public string ParamAddr
        {
            get
            {
                return paramAddr;
            }

            set
            {
                paramAddr = value;
            }
        }

        public string ParamValue
        {
            get
            {
                return paramValue;
            }

            set
            {
                paramValue = value;
            }
        }

        public DateTime CmdTime
        {
            get
            {
                return cmdTime;
            }

            set
            {
                cmdTime = value;
            }
        }

        public string Runned
        {
            get
            {
                return runned;
            }

            set
            {
                runned = value;
            }
        }

        public CCTV_FixedColor()
        {
            InitializeComponent();
            this.StatusDescription = "正常";
        }

        protected override void OnPaint(PaintEventArgs pe)
        {
            base.OnPaint(pe);
        }

        private void CCTV_FixedColor_DoubleClick(object sender, EventArgs e)
        {
            CCTVForm CF = new CCTVForm();
            CF.StartPosition = FormStartPosition.CenterScreen;
            CF.ShowDialog();
        }
    }
}
